﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DLTN.Data;
using DLTN.Entities;

public partial class Controls_ControlBannerSlideTop : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            HienThiBaiViet();
        }
    }

    /// <summary>
    /// Hiển thị Bài viết
    /// </summary>
    private void HienThiBaiViet()
    {
        int TotalRows = 0;
        string WhereClause = "1=1 and TrangThai=0";
        TList<Tour> TList_Tour = DataRepository.TourProvider.GetPaged(WhereClause, "NgayCapNhat DESC", 0, 5, out TotalRows);
        dlBaiViet.DataSource = TList_Tour;
        dlBaiViet.DataBind();
    }

    public string GetTieuDe(object Char)
    {
        string s = Char.ToString();
        return Common.ConvertToUnSign(s);
    }
}